/**
 * 
 */
package com.mc.fastjson;

import java.io.File;
import java.io.IOException;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;

import org.apache.commons.io.FileUtils;
import org.apache.commons.net.util.Base64;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

/**
 * 海康威视设备能力集
 * 2023年2月21日
 * 
 * @author w.weizhen
 *
 */
public class SheBeiNengLiJi {
	/**
	 * @param args
	 */
	public static void main(String[] args) 
	{
		try {
			String path = "D:\\hynetic\\tmp\\json.txt";
			//读取本地json文件，转为json集合
	        String fastjson=FileUtils.readFileToString(new File(path), "UTF-8");
	        //JSONObject data = JSON.parseObject(fastjson);
	        
	        System.out.println(fastjson);
	        JSONArray datas = JSON.parseArray(fastjson);
	        System.out.println(datas.toJSONString());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}